import { Modal,Button } from 'antd';
import { ModalForm } from '@ant-design/pro-components';
import React, { PropsWithChildren, useEffect, useState } from 'react';

interface CreateFormProps {
  modalVisible: boolean;
  onCancel: () => void;
  title:string
}

const CreateForm: React.FC<PropsWithChildren<CreateFormProps>> = (props) => {
  const { modalVisible, onCancel,title} = props;

  return (
    <Modal

      forceRender
      title={title}
      width={420}
      open={modalVisible}
      onCancel={() => onCancel()}
      footer={null}
      
    >
      
      {props.children}
      
    </Modal>
  );
};

export default CreateForm;
